package com.xqledu.admin.entry.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xqledu.admin.annotation.TypeHandler;
import com.xqledu.admin.handler.BooleanTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @description: bean类基础属性
 * @author: 向其林
 * @date: 2023/5/5 0005 22:07
 * @version: 1.0
 **/
@Data
@ApiModel(value = "Bean基本字段")
public class BaseModel implements Serializable {
    @ApiModelProperty(value = "id")
    private String id;
    @JsonFormat(timezone = "GMT8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @JsonFormat(timezone = "GMT8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;
    @ApiModelProperty(value = "创建者")
    private String createBy;
    @ApiModelProperty(value = "修改者")
    private String updateBy;
    @ApiModelProperty(value = "逻辑删除，0是1否")
    @TypeHandler(BooleanTypeHandler.class)
    private Boolean isFlag;
}
